#pragma once

#include <gofcl_fwdgt_r.h>

typedef struct {
	u16_s PUD : 1;
	u16_s RUD : 1;
	u16_s : 14;
} fwdgt_stat_s;

_Static_assert(sizeof(fwdgt_stat_s) == 2, "Struct fwdgt_stat_s defined error!");

static inline fwdgt_stat_s fwdgt_rreg_stat_s(void) {
	union {
		fwdgt_stat_s s;
		u32_s u;
	} su = {
		.u = fwdgt_rreg_u16(FWDGT_STAT_R, 0),
	};
	return su.s;
}
